package com.hspedu.homework.homework09;

/**
 * 9.设计一个Point类，其x和y坐标可以通过构造器提供。
 * 提供一个子类LabeledPoint，其构造器接收一个标签纸和x，y坐标，
 * 比如("Black Thursday", 1929,230.7)，
 */
public class Homework09 {
    public static void main(String[] args) {
        Point labeledPoint = new LabeledPoint("Black Thursday", 1929,230.7);
    }
}

class Point{
    private double x;
    private double y;

    public Point() {
    }

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

}

class LabeledPoint extends Point{
    private String label;

    public LabeledPoint(String label,double x, double y) {
        super(x, y);
        this.label = label;
    }
}